{{extend layout}}

{{block content_main}}
{{use "jquery", css_only=True}}
<div class="content">
    <div class="box col_12 center">
        <h2>{{=title}}</h2>
        <div class="box-body">
            {{embed view}}
            <div style="padding:5px;">
            {{if object.can_modify(request.user):}}
            <a class="btn btn-green" href="{{=get_url('edit', obj_id)}}">{{=_('Edit')}}</a>
            {{pass}}
            {{if request.user.is_superuser or (request.user.department == '2' and request.user.is_gm and object._kfzx_ == request.user._kfzx_):}}
            <a class="btn btn-blue" href="{{=get_url('delete', obj_id)}}" onclick="return confirm('{{=_("Do you want to delete this record?")}}');">{{=_('Delete')}}</a>
            {{pass}}
            <a class="btn btn-green" href="/tasks/develop/list?assignment={{=object.id}}" target="_blank">查看开发任务</a>
            <a class="btn btn-green" href="/tasks/researches/list?assignment={{=object.id}}" target="_blank">查看可研任务</a>
            <a class="btn btn-green" href="/tasks/nondevelop/list?assignment={{=object.id}}" target="_blank">查看非开发任务</a>
            </div>
        </div>
    </div>
</div>
{{end}}
